package com.mzkj.wanjulaile.mobile.api.modules.app.controller;

import com.mzkj.common.data.StatusCode;
import com.mzkj.wanjulaile.mobile.api.common.controller.BaseController;
import com.mzkj.wanjulaile.mobile.api.common.entity.ResultEntity;
import com.mzkj.wanjulaile.mobile.api.modules.app.entity.AppInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

/**
 * AppInfoController
 * Created by wangxw on 2017/1/22.
 */
@Controller
@RequestMapping("/app")
public class AppInfoController extends BaseController {

    @RequestMapping("/lastVersion")
    @ResponseBody
    public ResultEntity<AppInfo> lastVersion(String clientType) {
        AppInfo app = new AppInfo();
        app.setVersionCode(1);
        app.setVersionName("0.10.1");
        app.setIntro("简介简介简介");
        app.setDownloadUrl("http://d.koudai.com/com.koudai.weishop/1000f/weishop_1000f.apk");
        app.setCreateTime(new Date());
//        app.setRequire(true);
        return new ResultEntity<>(StatusCode.SC0, app);
    }
}
